<?php

namespace App\Http\Requests;
/**
 * 表单验证
 * Class ModuleSaveRequest
 * @package App\Http\Requests
 */
class ModuleSaveRequest extends BaseRequest
{


    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $rules = [
            'name' => [
                'required',
                'between:2,20'
            ]
        ];
        return $rules;
    }

    public function messages()
    {
        return [
            'name.required' => '请输入模块名称',
            'name.between' => '模块名称字符长度:min-:max'
        ];
    }
}
